<?php
require_once $_site->get_viewpath("boss/common/authcheck");
require_once $_site->get_viewpath("mobile/common/header");

//时间
$datestr=date('Y-m-d');
?>	
</head>

	<body>
		<div class="headertwo clearfloat" id="header">
			<a href="javascript:history.go(-1)" class="fl box-s"><i class="iconfont icon-arrow-l fl"></i></a>
			<p class="fl"><?php echo $pinfo['title']?$pinfo['title'].' ':''; ?>挖机装车明细</p>
			<a href="/boss/center" class="fr"><i class="iconfont icon-gerenzhongxin fl"></i></a>
		</div>
				
												
		<div class="exten clearfloat" id="main">
		    <form action="/handle.php" method="get" id="formreprot">
		    <input type="hidden" name="h" value="boss/boss_report">
		    <input type="hidden" name="randtime" value="<?php echo time();?>">
			<div class="land-ctent clearfloat pay-bottom">
				<ul>					
					<li class="box-s clearfloat">
						<p class="tit fl">开始日期</p>
						<input type="text" id="starttime" data-options='{"type":"date","beginYear":2016,"endYear":2017}'  name="start_time" value="<?php echo $datestr;?>" placeholder="请选择开始日期" readonly="readonly" class="fl day timetbtn" />
						<i class="iconfont icon-arrowright fl"></i>
					</li>
					<li class="box-s clearfloat">
						<p class="tit fl">截止日期</p>						
						<input type="text" id="endtime" data-options='{"type":"date","beginYear":2016,"endYear":2017}'  name="end_time" value="<?php echo $datestr;?>" placeholder="请选择截止日期" readonly="readonly" class="fl day timetbtn" />
						<i class="iconfont icon-arrowright fl"></i>
					</li>					
				</ul>
			</div>		
			</form>
		
			<div class="middle clearfloat box-s fl">
				<a href="javascript:;" id="submitbtn" onclick="confirmreport('formreprot','是否导出报表？');"  class="pay-btn clearfloat">
					导出报表
				</a>
<div class="recom-tit clearfloat box-s fl">
		    		<p>使用说明</p>
		    	</div>
		    	<div class="ctent clearfloat box-s fl">		    		
			    	<p>
			    		1、起止日期不能超过10天。
			    	</p>
			    	<p>
			    		2、导出报表后，QQ浏览器可以直接打开查看。您也可以将导出的报表文件通过微信或QQ发送至电脑端。
			    	</p>
		    	</div>
				
			</div>			
		</div>
		
	</body>	
	<script type="text/javascript" src="/static/mobile/js/psong.js" ></script>	
	<script type="text/javascript" src="/static/mobile/js/menu.js" ></script>	
	<link href="/static/mobile/css/mui.picker.min.css" rel="stylesheet" />
	<script src="/static/mobile/js/mui.picker.min.js"></script>            
	<script>
		mui.init();
		(function($) {					    
			var btns=$(".timetbtn");
			btns.each(function(i, btn){
				btn.addEventListener('tap', function() {
					var optionsJson = this.getAttribute('data-options') || '{}';
					var options = JSON.parse(optionsJson);
					var id = this.getAttribute('id');
					var picker = new $.DtPicker(options);					
					picker.show(function(rs) {					
						document.getElementById(id).value=rs.text;	
						picker.dispose();																									
					});
				}, false);
			});
		})(mui);

		function confirmreport(id,cmsg){
			var obj=$("#"+id);	
			if($(obj).data('lock'))return;							
			$(obj).data('lock', true);				
			var btnArray = ['否', '是'];
			$("#submitbtn").removeClass('pay-btn').addClass('pay-btn-disable');
			mui.confirm(cmsg, '', btnArray, function(e) {
				if(e.index ==1){										
					obj.submit();	
				}else{					
					$(obj).data('lock', false);
					$("#submitbtn").removeClass('pay-btn-disable').addClass('pay-btn');
				} 
			})			
		}		
	</script>	
</html>